#ifndef __USB_HOST__H_
#define __USB_HOST__H_

#ifdef __cplusplus
extern "C"{
#endif

#include "Pipe.h"

typedef struct _PipeCfg
{
	uint8 pipeNum;
	uint8 epNum;
}PipeCfg;

#define MAX_PIPE_COUNT 5
#define MAX_UHDEV_COUNT 2
typedef struct _UsbHost
{
	uint8	m_PipeCount;
	
	Pipe*	m_pPipe[MAX_PIPE_COUNT];
	struct _UhDev*	m_pUhDev[MAX_UHDEV_COUNT];
}UsbHost;

void UsbHost_Init();
void UsbHost_AddPipe(Pipe* pPipe);
void UsbHost_RemovePipe(Pipe* pPipe);
void UsbHost_BusReset();
void usb_host_interrupt(void);

#ifdef __cplusplus
}
#endif

#endif


